<template>
    <el-container id="box">
        <el-header>优购电商管理系统</el-header>
        <el-container>
            <el-aside width="200px">
                <Menu></Menu>
            </el-aside>
            <el-main  v-loading="loading">
                <router-view></router-view>
            </el-main>
        </el-container>
    </el-container>
</template>

<script>
    import Menu from '@/views/Menu/Index.vue'
    import store from '@/store/index.js'

    export default {
        name: 'Index',
        components: {
            Menu
        },
        data() {
            return {

            }
        },
        computed: {
            loading () {
                return store.getters.GET_LOADING
            }
        }
    }
</script>

<style scoped lang="less">
    #box {
        height: 100% !important;
        box-sizing: border-box;
        display: flex;

        .el-header {
            height: 60px !important;
            background-color: #1976D2;
            color: white;
            text-align: center;
            font-size: 25px;
            font-weight: bold;
            letter-spacing: 20px;
            line-height: 60px;
        }
        .el-container {
            width: 100% !important;
            display: flex;
            
            .el-aside {
                background-color: #80c5fd;
                height: 100%;
            }
            .el-main {
                flex: 1;
            }
        }
    }
</style>